package com.situ.crm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.situ.crm.common.mapper.BaseMapper;
import com.situ.crm.entity.UserRole;

public interface UserRoleMapper extends BaseMapper<UserRole>{

	@Delete("delete from user_role where user_id = #{userId} and role_id = #{roleId} ")
	int removeRole(@Param("userId")Integer userId, @Param("roleId")Integer roleId);

	@Select("select * from user_role where user_id = #{userId}")
	List<UserRole> selectByUserId(Integer userId);

}
